<template>
	<scroll-view @scroll="scroll" class="detail" style="height: 100vh;"
		:scroll-y="(showtow || show) == true ?false:true">
		<!-- <view @scroll.native="scroll" class="detail"
			:style="(showtow || show) == true ?'height:100vh;overflow:hidden;':'height:100vh;overflow-x:hidden'"> -->
		<view class="detail_title">
			<view class="detail_title_missionBoard"></view>
			<view :style="'background-color: rgba(255,255,255,'+(scrollBG >= 1?1:scrollBG)+');'"
				class="detail_title_content">
				<view class="detail_title_content_left">
					<view @click="backReturn" class="detail_title_content_left_img">
						<image src="../../../static/home/search_left.png" mode="widthFix"></image>
					</view>
					<!-- <view class="detail_title_content_left_input">
						<u-search placeholder="搜索" :showAction="false" class="detail_title_content_left_inputs"
							:clearabled="true"></u-search>
					</view> -->

				</view>
				<view class="detail_title_content_right">
					<!-- <view class="detail_title_content_right_tab">
						<image src="../../../static/home/Mallshoppingcart.png" mode=""></image>
					</view>
					<view class="detail_title_content_right_tab">
						<image src="../../../static/home/Mallshare.png" mode=""></image>
					</view> -->
					<view class="detail_title_content_left_share">
						<image @click="openshare" src="/static/home/Mallshare.png" mode="widthFix"></image>
					</view>
				</view>
			</view>
		</view>
		<view class="detail_bannerBox">
			<u-swiper height="754upx" indicator indicatorMode="line" circular :list="form.bannerImages"></u-swiper>
		</view>
		<view class="detail_Introduction">
			<view class="detail_Introduction_top">
				<view class="detail_Introduction_top_title">
					{{form.name}}
				</view>
				<view class="detail_Introduction_top_text">
					<text class="member_price">
						平台VIP价
					</text>
					<text class="member_Specification">
						￥
					</text>
					<text class="member_num">
						{{form.memberPrice}}
					</text>
					<view class="Original_price">
						原价
					</view>
					<view class="Original_num">
						{{form.price}}
					</view>
				</view>
				<!-- <view class="detail_Introduction_top_text">
					<text class="member_price">
						自买约省
					</text>
					<text class="member_Specification">
						￥
					</text>
					<text class="member_num">
						{{zigoushengqian()}}
					</text>
					<text class="member_price" style="margin-left: 20upx;">
						分享约赚
					</text>
					<text class="member_Specification">
						￥
					</text>
					<text class="member_num">
						{{fenxiangbili()}}
					</text>
				</view> -->
				<view class="detail_Introduction_top_deteils">
					{{form.introduce}}
				</view>
			</view>
			<view class="detail_Introduction_bottom">
				<view class="detail_Introduction_bottom_tabs">
					<view class="detail_Introduction_bottom_tabs_left">
						分类
					</view>
					<u-cell :title="form.typeId" class="detail_Introduction_bottom_tabs_right" :border="false">
					</u-cell>
				</view>
				<view class="detail_Introduction_bottom_tabs">
					<view class="detail_Introduction_bottom_tabs_left">
						选择
					</view>
					<u-cell @click="show = true" title="商品规格" class="detail_Introduction_bottom_tabs_right"
						:border="false" isLink></u-cell>
				</view>
				<view class="detail_Introduction_bottom_tabs">
					<view class="detail_Introduction_bottom_tabs_left">
						参数
					</view>
					<u-cell @click="showtow = true" title="商品参数" class="detail_Introduction_bottom_tabs_right"
						:border="false" isLink></u-cell>
				</view>
			</view>
		</view>

		<view class="detail_describe">
			商品详情
		</view>
		<view class="detail_detail">
			<image class="detail_detail_img" v-for="(item,index) in form.detailsImages" :src="item" mode="widthFix">
			</image>
		</view>
		<view class="detail_bottomBox">
			<view class="bottom_bigbox">
				<view class="coll_box">
					<view v-if="iscoll==0" @click="goodcollectioncreate" class="coll">
						<image src="../../../static/tabsIcon/coll1.png" mode=""></image>
						<text>收藏商品</text>
					</view>
					<view v-else @click="goodcollectiondelete" class="coll">
						<image src="../../../static/tabsIcon/coll2.png" mode=""></image>
						<text>取消收藏</text>
					</view>
				</view>
			</view>
			<!-- <button @click="shoppingCart" class="detail_bottomBox_reservation">
				加入购物车
			</button> -->
			<button @click="confirm" class="detail_bottomBox_panicBuying">
				立即抢购
			</button>
		</view>
		<u-popup :show="show" :round="true" @close="close" @open="open" mode="bottom">
			<view class="modeBox">
				<scroll-view :cancelable="false" style="height: calc(100% );" scroll-y="true">
					<view v-for="(item,index) in Specification" class="modeBox_listbox">
						<view class="modeBox_listbox_title">
							{{item.name}}
						</view>
						<view class="modeBox_listbox_content">
							<view v-for="(itemt,indext) in item.goodsSpecificationsList"
								:class="SpecificaObj[item.id] == itemt.id?'modeBox_listbox_content_tab_active':''"
								@click="SpecificaObj[item.id] = itemt.id;InStock(item,itemt,)"
								class="modeBox_listbox_content_tab"
								:style="itemt.image?'width:calc((100% - 60upx) / 3)':''">
								<view v-if="!itemt.num" class="OutOfStock">
									缺货
								</view>
								<view v-if="itemt.image" class="modeBox_listbox_content_tab_imageBox">
									<view class="modeBox_listbox_content_tab_imageBox_img">
										<image :src="itemt.image" mode=""></image>
									</view>
									<view class="modeBox_listbox_content_tab_imageBox_text">
										{{itemt.value}}
									</view>
								</view>
								<view v-if="!itemt.image" class="modeBox_listbox_content_tab_textBro">
									{{itemt.value}}
								</view>
							</view>
						</view>
					</view>
				</scroll-view>
				<view class="detail_bottomBox">
					<view class="bottom_bigbox">
						<view class="coll_box">
							<view v-if="iscoll==0" @click="goodcollectioncreate" class="coll">
								<image src="../../../static/tabsIcon/coll1.png" mode=""></image>
								<text>收藏商品</text>
							</view>
							<view v-else @click="goodcollectiondelete" class="coll">
								<image src="../../../static/tabsIcon/coll2.png" mode=""></image>
								<text>取消收藏</text>
							</view>
						</view>
					</view>
					<!-- <button @click="shoppingCart" class="detail_bottomBox_reservation">
						加入购物车
					</button> -->
					<button @click="confirm" class="detail_bottomBox_panicBuying">
						立即抢购
					</button>
				</view>
			</view>
		</u-popup>

		<u-popup :show="showtow" :round="true" @close="showtow = false" @open="open" mode="bottom">
			<view class="modeBox" style="padding-bottom:20upx;">
				<scroll-view :cancelable="false" style="height: 100%;" scroll-y="true">
					<view v-for="(item,index) in form.list" class="modeBox_list">
						<view class="modeBox_list_left">
							{{item.name}}
						</view>
						<view class="modeBox_list_right">
							{{item.value}}
						</view>
					</view>
				</scroll-view>
			</view>
		</u-popup>
		<!-- </view> -->
		<u-popup :show="shareShow" :round="true" @close="shareShow = false" @open="open" mode="bottom">
			<view class="sharemodeBox">
				<wm-poster @success="success" :imgSrc="form.mainImages" :QrSrc="QrSrc" :Title="form.name"
					:PriceTxt="form.memberPrice" :OriginalTxt="form.price"></wm-poster>
				<view v-if='successType' class="sharemodeBox_buttonBox">
					<view class="sharemodeBox_buttonBox_button">
						<u-button @click="shareShow = false" text="取消"></u-button>
					</view>
					<view class="sharemodeBox_buttonBox_button">
						<u-button @click="share" type="primary" text="分享给微信好友"></u-button>
					</view>
				</view>
			</view>
		</u-popup>

	</scroll-view>
</template>

<script>
	import {
		getinfo
	} from '@/api/mine'
	import wmPoster from "@/components/wm-poster/wm-poster.vue"
	import {
		bootgoodsselectdetail,
		bootgoodsselectgoodsSpecifications,
		bootgoodsSpecificationsNumselectNum,
		bootshoppingCartinsert,
		goodcollectioncreate,
		goodcollectiondelete,
		goodcollectioncheck
	} from '@/api/home'
	export default {
		data() {
			return {
				QrSrc: '',
				user: JSON.parse(uni.getStorageSync('user')),
				form: {},
				shareShow: false,
				scrollBG: 0,
				show: false,
				showtow: false,
				Specification: [],
				SpecificaObj: {},
				id: '',
				iscoll: 0,
				successType: false,
				successUrl: '',
				isvip:0,
			}
		},
		components: {
			wmPoster
		},
		onLoad(data) {
			
			this.id = data.id;
			this.chuang(encodeURIComponent('http://ryngzh.hisway365.com/#/pages/index/detail/detail?id=' + data.id + '&type=4&invitacode=' +
				this.user.invitationCode ))
			this.getinfo();
			this.bootgoodsselectdetail(data.id)
			this.bootgoodsselectgoodsSpecifications(data.id)
			this.goodcollectioncheck()
		},
		methods: {
			getinfo() {
				getinfo().then(res => {
						if (res.success == 1) {
							this.isvip = res.data.isVip;
							console.log(res.data)
						} else {
							uni.showToast({
								icon: 'none',
								title: res.message
							})
						}
					})
					.catch(err => {
			
					});
			},
			fenxiangbili() {
				if (this.isvip == 1) {
					return (this.form.price * 0.06).toFixed(2);
				} else {
					return (this.form.price * 0.03).toFixed(2);
				}
				return 0
			},
			zigoushengqian() {
				return (this.form.price * 0.03).toFixed(2);
				return 0
			},
			share() {
				uni.share({
					provider: "weixin",
					scene: "WXSceneSession",
					type: 2,
					imageUrl:this.successUrl,
					success: function(res) {
						console.log("success:" + JSON.stringify(res));
					},
					fail: function(err) {
						console.log("fail:" + JSON.stringify(err));
					}
				});
			},
			openshare() {
				this.shareShow = true;
				uni.showLoading({
					title: '加载中',
					mask: true
				});

			},
			success(e) {
				// console.log(e.tempFilePath)
				this.successType = true
				this.successUrl = e.tempFilePath
				uni.hideLoading()
			},
			chuang(text) {
				this.QrSrc =
					`https://tool.oschina.net/action/qrcode/generate?data=${text}&output=image%2Fgif&error=L&type=0&margin=0&size=4&1646030986871`
					console.log(this.QrSrc)
			},
			goodcollectioncreate() {
				let data = {
					goodId: this.id
				}
				goodcollectioncreate(data).then(res => {
					if (res.success == 1) {
						uni.showToast({
							icon: 'none',
							title: '收藏成功!'
						})
						this.goodcollectioncheck()
						// this.bootgoodsselectdetail(this.id)
					} else {
						uni.showToast({
							icon: 'none',
							title: res.message
						})
					}
				})
			},
			goodcollectiondelete() {
				let data = {
					id: this.id
				}
				goodcollectiondelete(data).then(res => {
					if (res.success == 1) {
						uni.showToast({
							icon: 'none',
							title: '取消成功!'
						})
						this.goodcollectioncheck()
						// this.bootgoodsselectdetail(this.id)
					} else {
						uni.showToast({
							icon: 'none',
							title: res.message
						})
					}
				})
			},
			goodcollectioncheck() {
				let data = {
					id: this.id
				}
				goodcollectioncheck(data).then(res => {
					if (res.success == 1) {
						this.iscoll = res.data.state
						// this.bootgoodsselectdetail(this.id)
					} else {
						uni.showToast({
							icon: 'none',
							title: res.message
						})
					}
				})
			},
			shoppingCart() {
				let keys = Object.keys(this.SpecificaObj)
				if (!keys.length) {
					return
				}
				let type = true;
				let typeNo = true;
				let arr = [];
				let teost = [];
				let obj = {}
				let goodsSpecificationsValue = []
				keys.forEach(itme => {
					let em = this.SpecificaObj[itme]
					if (!em) {
						type = false
						arr.push(itme)
					} else {
						for (var i = 0; i < this.Specification.length; i++) {
							let ele = this.Specification[i]
							for (var p = 0; p < ele.goodsSpecificationsList.length; p++) {
								let element = ele.goodsSpecificationsList[p];
								if (element.id == em) {
									if (element.num <= 0) {
										uni.showToast({
											title: ele.name + '：' + element.value + '目前是缺货状态',
											duration: 2000,
											icon: 'none'
										});
										typeNo = false
									} else {
										goodsSpecificationsValue.push({
											name: element.value,
											value: em,
											boxName: ele.name
										})
									}
								}
							}
						}

					}
				})
				for (var i = 0; i < arr.length; i++) {
					let tm = arr[i]
					let queryData = this.Specification.filter(function(fp) {
						return fp.id === tm
					})
					teost.push(queryData[0].name)
				}
				if (!type) {
					uni.showToast({
						title: '请选择 ' + teost.join(' '),
						duration: 2000,
						icon: 'none'
					});
					this.show = true
					return
				}
				if (!typeNo) return false
				obj.goodsId = this.form.id;
				obj.goodsSpecificationsValue = goodsSpecificationsValue
				let goodsSpecificationsValuearr = []
				for (var i = 0; i < obj.goodsSpecificationsValue.length; i++) {
					let elem = obj.goodsSpecificationsValue[i]
					goodsSpecificationsValuearr.push(elem.value)
				}
				let queryObj = {
					goodsId: this.id,
					goodsSpecificationsIds: goodsSpecificationsValuearr.join(','),
					num: 1
				}
				console.log(queryObj)
				bootshoppingCartinsert(queryObj).then(res => {
					uni.showToast({
						title: res.message,
						duration: 2000,
						icon: 'none'
					});
				})
			},
			confirm() {
				let keys = Object.keys(this.SpecificaObj)
				if (!keys.length) {
					return
				}
				let type = true;
				let typeNo = true;
				let arr = [];
				let teost = [];
				let obj = {}
				let goodsSpecificationsValue = []

				keys.forEach(itme => {
					let em = this.SpecificaObj[itme]
					if (!em) {
						type = false
						arr.push(itme)
					} else {
						for (var i = 0; i < this.Specification.length; i++) {
							let ele = this.Specification[i]
							for (var p = 0; p < ele.goodsSpecificationsList.length; p++) {
								let element = ele.goodsSpecificationsList[p];
								if (element.id == em) {
									if (element.num <= 0) {
										uni.showToast({
											title: ele.name + '：' + element.value + '目前是缺货状态',
											duration: 2000,
											icon: 'none'
										});
										typeNo = false
									} else {
										goodsSpecificationsValue.push({
											name: element.value,
											value: em,
											boxName: ele.name
										})
									}
								}
							}
						}

					}
				})
				for (var i = 0; i < arr.length; i++) {
					let tm = arr[i]
					let queryData = this.Specification.filter(function(fp) {
						return fp.id === tm
					})
					teost.push(queryData[0].name)
				}
				if (!type) {
					uni.showToast({
						title: '请选择 ' + teost.join(' '),
						duration: 2000,
						icon: 'none'
					});
					this.show = true
					return
				}

				obj.goodsId = this.form.id;
				obj.goodsSpecificationsValue = goodsSpecificationsValue
				obj.isLimit = this.form.isLimit ;
				obj.purchaseLimitNum = this.form.purchaseLimitNum;
				if (!typeNo) return false
				uni.navigateTo({
					url: '/pages/index/placeOrder/placeOrder?data=' + JSON.stringify(obj)
				});
			},
			InStock(e, t) {
				this.$forceUpdate()
				let keys = Object.keys(this.SpecificaObj)
				let arr = [];
				for (var i = 0; i < keys.length; i++) {
					let elemt = keys[i]
					if (this.SpecificaObj[elemt]) {
						arr.push(this.SpecificaObj[elemt])
					}
				}
				bootgoodsSpecificationsNumselectNum(this.id, arr).then(res => {
					this.Specification = res.data
				})
			},
			scroll(e) {
				this.scrollBG = (e.detail.scrollTop * 0.03) / 10
			},
			bootgoodsselectgoodsSpecifications(id) {
				bootgoodsselectgoodsSpecifications(id).then(res => {
					console.log(res);
					res.data.forEach(item => {
						// item.CheckId = null
						this.SpecificaObj[item.id] = ''
					})
					this.Specification = res.data
				})
			},
			open() {

			},
			close(open) {
				this.show = false
			},
			bootgoodsselectdetail(id) {
				bootgoodsselectdetail(id).then(res => {
					res.data.bannerImages = res.data.bannerImages.split('*')
					res.data.detailsImages = res.data.detailsImages.split('*')
					this.form = res.data
				})
			},
			backReturn() {
				uni.navigateBack({});
			},
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #f7f7f7;
	}

	* {
		box-sizing: border-box;
		margin: 0;
		padding: 0;
	}

	.detail {
		padding-top: var(--status-bar-height);
		padding-bottom: 160upx;

		.detail_title {
			position: fixed;
			top: 0;
			width: 100%;
			left: 0;
			z-index: 1;

			.detail_title_missionBoard {
				background-image: linear-gradient(to right, #FE3D47, #FC773D);
				height: var(--status-bar-height);
			}

			.detail_title_content {
				display: flex;
				padding: 10upx 0;
				height: 70upx;

				.detail_title_content_left {
					display: flex;
					align-items: center;
					width: calc(100% - 50upx - 72upx - 72upx - 12upx - 8upx);
					// width: 100%;
					margin-right: 50upx;
					justify-content: space-between;

					.detail_title_content_left_img {
						font-size: 0;
						padding: 0 28upx;

						image {
							width: 18upx;
						}
					}


					.detail_title_content_left_input {
						width: calc(100% - 28upx - 28upx - 18upx);

						.detail_title_content_left_inputs {
							/deep/ .u-search__content__input--placeholder {
								background-color: rgba(0, 0, 0, 0) !important;
							}

							/deep/ .u-search__content {
								background-color: rgba(0, 0, 0, 0.49) !important;

								.u-search__content__input {
									background-color: rgba(0, 0, 0, 0) !important;

									.uni-input-input {
										color: #FFFFFF;
									}
								}

								.u-icon__icon {
									color: rgba(255, 255, 255, 0.5) !important;
								}

							}

							/deep/ .u-search__content__input {
								background-color: rgba(0, 0, 0, 0) !important;
							}
						}
					}
				}

				.detail_title_content_right {
					display: flex;
					align-items: center;
					flex: 1;
					justify-content: flex-end;

					.detail_title_content_left_share {
						width: 70upx;
						font-size: 0;

						image {
							font-size: 0;
							width: 50upx;
						}
					}

					.detail_title_content_right_tab {
						width: 72upx;
						height: 72upx;
						font-size: 0;
						margin-right: 12upx;

						&:last-child {
							margin-right: 8upx;
						}

						image {
							width: 100%;
							height: 100%;
						}
					}
				}
			}
		}

		.detail_bannerBox {
			width: 100%;
			height: 754upx;

			image {
				width: 100%;
				height: 100%;
			}
		}

		.detail_Introduction {
			padding: 30upx 20upx 0 20upx;

			.detail_Introduction_top {
				background-color: #fff;
				border-radius: 36upx;
				padding: 26upx 30upx;

				.detail_Introduction_top_title {
					font-size: 34upx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: #000;
					line-height: 48upx;
				}

				.detail_Introduction_top_text {
					display: flex;
					align-items: center;

					.member_price {
						font-size: 22upx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: rgba(0, 0, 0, 0.9);
						line-height: 32upx;
					}

					.member_Specification {
						color: #ED2525;
						font-size: 22upx;
						margin-left: 6upx;
					}

					.member_num {
						font-size: 36upx;
						font-family: PingFangSC-Semibold, PingFang SC;
						font-weight: 600;
						color: #ED2525;
						line-height: 50upx;
						margin-left: 8upx;
					}

					.Original_price {
						font-size: 22upx;
						margin-left: 6upx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: rgba(0, 0, 0, 0.2);
						line-height: 32upx;
					}

					.Original_num {
						font-size: 22upx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: rgba(0, 0, 0, 0.2);
						line-height: 32upx;
						margin-left: 10upx;
						text-decoration: line-through;
					}
				}

				.detail_Introduction_top_deteils {
					min-height: 90upx;
					font-size: 26upx;
					font-family: PingFangSC-Regular, PingFang SC;
					font-weight: 400;
					color: rgba(0, 0, 0, 0.29);
					margin-top: 6upx;
					line-height: 36upx;
				}
			}

			.detail_Introduction_bottom {
				margin-top: 20upx;
				padding: 38upx 32upx;
				background-color: #FFFFFF;
				border-radius: 36upx;

				.detail_Introduction_bottom_tabs {
					display: flex;
					align-items: center;
					padding-bottom: 20upx;

					&:last-child {
						padding: 0;
					}

					.detail_Introduction_bottom_tabs_left {
						font-size: 22upx;
						font-family: PingFangSC-Regular, PingFang SC;
						font-weight: 400;
						color: rgba(0, 0, 0, 0.29);
						line-height: 32upx;
					}

					.detail_Introduction_bottom_tabs_right {
						width: calc(100% - 50upx - 38upx);
						margin-left: 38upx;

						/deep/ .u-cell__body {
							padding: 0;

							.u-cell__title-text span {
								font-size: 22upx;
								font-family: PingFangSC-Regular, PingFang SC;
								font-weight: 400;
								color: rgba(0, 0, 0, 0.9);
								line-height: 32upx;
							}
						}
					}
				}
			}
		}

		.detail_describe {
			font-size: 22upx;
			font-family: PingFangSC-Regular, PingFang SC;
			font-weight: 400;
			color: rgba(0, 0, 0, 0.3);
			line-height: 32upx;
			display: flex;
			justify-content: center;
			align-items: center;
			padding: 30upx;
		}

		.detail_detail {
			display: flex;
			width: 100%;
			flex-wrap: wrap;

			.detail_detail_img {
				width: 100%;
			}
		}

		.detail_bottomBox {
			width: 100%;
			height: 140upx;
			background-color: #FFFFFF;
			padding: 24upx 24upx;
			position: fixed;
			bottom: 0;
			left: 0;
			display: flex;

			.bottom_bigbox {
				width: 180rpx;
				display: flex;
				align-items: center;

				.coll {
					display: flex;
					align-items: center;
					flex-direction: column;
					justify-content: center;
					font-size: 24rpx;
				}

				image {
					width: 50rpx;
					height: 50rpx;
					// margin-bottom: 10rpx;
				}
			}

			.detail_bottomBox_reservation {
				width: 50%;
				background-color: #FFEBCC;
				background: #FFEBCC;
				border-radius: 46upx 0px 0px 46upx;
				display: flex;
				align-items: center;
				justify-content: center;
				border: none;
				font-size: 32upx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: rgba(0, 0, 0, 0.72);
				line-height: 22upx;

				&::after {
					content: '';
					display: none;
				}
			}

			.detail_bottomBox_panicBuying {
				background: #ED2525;
				// border-radius: 0px 46upx 46upx 0px;
				border-radius: 46upx;
				// width: 50%;
				width: 100%;
				display: flex;
				align-items: center;
				justify-content: center;

				font-size: 32upx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #FFFFFF;
				line-height: 44upx;


				&::after {
					content: '';
					display: none;
				}
			}
		}
	}

	.sharemodeBox {
		width: 100%;
		// height: 20%;
		position: fixed;
		top: 0;
		left: 50%;
		transform: translate(-50%);

		.sharemodeBox_buttonBox {
			display: flex;
			justify-content: space-between;
			align-items: center;

			.sharemodeBox_buttonBox_button {
				width: 50%;
				padding: 20upx 40upx;
			}
		}
	}

	.modeBox {
		height: 70vh;
		padding: 32upx;
		padding-bottom: 140upx;

		.modeBox_list {
			display: flex;
			padding: 32upx 0;
			border-bottom: 1px solid #f2f2f2;

			.modeBox_list_left {
				width: 200upx;
				color: #9c9c9c;
				font-size: 32upx;
			}

			.modeBox_list_right {
				width: calc(100% - 200upx);
				color: #555555;
				font-size: 32upx;
			}
		}

		.modeBox_listbox {
			margin-bottom: 30upx;

			&:last-child {
				margin: 0;
			}

			.modeBox_listbox_title {
				color: #000000;
				font-weight: 700;
				font-size: 30upx;
			}

			.modeBox_listbox_content {
				display: flex;
				flex-wrap: wrap;

				.modeBox_listbox_content_tab {
					margin-top: 20upx;
					margin-right: 20upx;
					font-size: 32upx;
					color: #333333;
					background-color: #f2f2f2;
					border: 2upx solid rgba(0, 0, 0, 0);
					position: relative;
					border-radius: 10upx;

					.OutOfStock {
						position: absolute;
						right: 0;
						top: 0;
						z-index: 1;
						font-size: 24upx;
						transform: translate(20%, -80%);
						background-color: #f2f2f2;
						color: #333333;
						padding: 10upx 20upx;
						border-radius: 15upx 0 15upx 0;
					}

					.modeBox_listbox_content_tab_textBro {
						padding: 10upx 20upx;
					}

					.modeBox_listbox_content_tab_imageBox {
						width: 100%;
						overflow: hidden;
						border-radius: 10upx 10upx 0 0;

						.modeBox_listbox_content_tab_imageBox_img {
							width: 100%;
							height: 200upx;
							font-size: 0;

							image {
								width: 100%;
								height: 100%;
							}
						}

						.modeBox_listbox_content_tab_imageBox_text {
							padding: 10upx 20upx;
							text-align: center;
							overflow: hidden;
							text-overflow: ellipsis;
							white-space: nowrap;
						}
					}
				}

				.modeBox_listbox_content_tab_active {
					color: #f3574a;
					background-color: #fbedea;
					border: 2upx solid #f3574a;

					.OutOfStock {
						color: #FFFFFF;
						background-color: #f3574a;
					}
				}
			}
		}
	}
</style>
